#pragma once
#include <typescommon.h>
// thread executor struct
struct thrdExeStct
{
    pthread_t threadFd;
    pthread_mutex_t thrdLock;
    int threadRunflag;
    void *(*threadCallBack)(void *);
    void *userData;
};

void thrdExeInit(struct thrdExeStct *threadExcut, void *(*threadCallBack)(void *), void *setUserData);
void thrdExeBegin(struct thrdExeStct *threadExcut);
void thrdExeQuit(struct thrdExeStct *threadExcut);
int thrdExeLock(struct thrdExeStct *threadExcut);
int thrdExeLockTry(struct thrdExeStct *threadExcut);
int thrdExeUnlock(struct thrdExeStct *threadExcut);
